#!/bin/bash

cd /root/

#wget http://nginx.org/download/nginx-1.12.2.tar.gz
#tar zxvf nginx-1.12.2.tar.gz
#cd ./nginx-1.12.2
#apt-get install -y build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev libgoogle-perftools-dev libperl-dev libtool openssl
#./configure --with-http_ssl_module && make && make install
#cp /etc/nginx/nginx.conf /usr/local/nginx/conf/nginx.conf
#/usr/local/nginx/sbin/nginx
apt-get update
apt-get install -y net-tools python
#apt-get install -y mutt msmtp nginx keepalived

cp /opt/muttrc ~/.muttrc -fr
cp /opt/msmtprc ~/.msmtprc -fr

chmod 600 .msmtprc
touch ~/.msmtplog

/usr/bin/python /opt/web.py &
/etc/init.d/nginx start
service keepalived start
while true;do
    echo 'sleeping 1'
    sleep 10
done
